package business.algorithm.technicalIndicator;

public class TechnicalIndicatorAPI {
	private static final String SMA = "SMA";
	private static final String EMA = "EMA";
	private static final String BOLLINGER = "Bollinger Band";
	private static final String RSI = "RSI";
	private static final String STOCHASTIC = "Stochastic Oscillator";
	public static final String[] TECHNICAL_INDICATOR_LIST = { SMA, EMA, BOLLINGER, RSI, STOCHASTIC };

	public static AbstractTechnicalIndicator getTechnicalIndicator(
			String algorithmName) {
		if (algorithmName.equals(SMA))
			return new SimpleMovingAverage();
		else if (algorithmName.equals(EMA))
			return new ExponentialMovingAverage();
		else if (algorithmName.equals(BOLLINGER))
			return new BollingerBand();
		else if (algorithmName.equals(RSI))
			return new RelativeStrengthIndex();
		else if (algorithmName.equals(STOCHASTIC))
			return new StochasticOscillator();
		return null;
	}
}
